﻿//
// IRobotControllerContract.cs
//
// Authors:
//    Claus Jørgensen <10229@iha.dk>
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.Contracts;

namespace RSD.Robot.Contracts
{
#pragma warning disable 67

    [ContractClassFor(typeof(IRobotController))]
    internal abstract class IRobotControllerContract : IRobotController
    {
        #region IRobotController Members

        public event EventHandler<InitializationCompletedEventArgs>  InitializationCompleted;

        public event EventHandler<HomingStatusEventArgs> HomingStatusChanged;

        public event EventHandler<IOEventArgs> DigitalInputReceived;

        public event EventHandler<IOEventArgs> DigitalOutputReceived;

        public event EventHandler<JointStatusEventArgs> JointStatusChanged;

        public event EventHandler<ControlStatusEventArgs> ControlStatusChanged;

        public event EventHandler<MotionEventArgs> MotionStarted;

        public event EventHandler<MotionEventArgs> MotionEnded;

        public event EventHandler ActionStarted;

        public event EventHandler ActionCompleted;

        public string ParameterFolder
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public uint Version
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public bool IsEmergency
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public bool IsInTeachingMode
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public bool IsOnline
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public USBCConfiguration Configuration
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public Tuple<short, short> Jaw
        {
            get
            {
                throw new NotImplementedException();
            }
        }

        public bool Initialization(InitializationMode mode)
        {
            throw new NotImplementedException();
        }

        public bool Initialization(InitializationMode mode, SystemType systemType)
        {
            throw new NotImplementedException();
        }

        public void Close()
        {
            throw new NotImplementedException();
        }

        public bool MonitorDigitalInput()
        {
            throw new NotImplementedException();
        }

        public bool MonitorDigitalOutput()
        {
            throw new NotImplementedException();
        }

        public uint GetDigitalInput()
        {
            throw new NotImplementedException();
        }

        public uint GetDigitalOutput()
        {
            throw new NotImplementedException();
        }

        public void MonitorMotion()
        {
            throw new NotImplementedException();
        }

        public bool SetTime(Axis axis, TimeSpan time)
        {
            Contract.Requires(time != null);

            return default(bool);
        }

        public bool SetSpeed(Axis axis, int speed)
        {
            Contract.Requires(speed >= 0 || speed <= 10);

            return default(bool);
        }

        public bool MoveJoint(Vector vector)
        {
            Contract.Requires(vector != null);

            return default(bool);
        }

        public bool MoveJoint(Vector vectorA, Vector vectorB)
        {
            Contract.Requires(vectorA != null);
            Contract.Requires(vectorB != null);

            return default(bool);
        }

        public bool MoveLinear(Vector vector)
        {
            Contract.Requires(vector != null);

            return default(bool);
        }

        public bool MoveLinear(Vector vectorA, Vector vectorB)
        {
            Contract.Requires(vectorA != null);
            Contract.Requires(vectorB != null);

            return default(bool);
        }

        public bool MoveConveyorBelt(int velocity)
        {
            Contract.Requires(velocity <= -100 || velocity >= 100);

            return default(bool);
        }

        public bool OpenGripper()
        {
            throw new NotImplementedException();
        }

        public bool CloseGripper()
        {
            throw new NotImplementedException();
        }

        public bool StopMovement(Axis axis)
        {
            throw new NotImplementedException();
        }

        public bool SetVelocity(Axis axis, short velocity)
        {
            Contract.Requires(velocity <= -100 || velocity >= 100);

            return default(bool);
        }

        public bool SetControl(Axis axis, bool isOn)
        {
            throw new NotImplementedException();
        }

        public bool MonitorControlStatus()
        {
            throw new NotImplementedException();
        }

        public bool MonitorHomingStatus()
        {
            throw new NotImplementedException();
        }

        public bool Home(Axis axis)
        {
            throw new NotImplementedException();
        }

        public bool SetHome(Axis axis)
        {
            throw new NotImplementedException();
        }

        public bool MonitorJointStatus()
        {
            throw new NotImplementedException();
        }

        public bool LoadPointsFromFile(string fileName)
        {
            Contract.Requires(!string.IsNullOrEmpty(fileName));

            return default(bool);
        }

        public Vector DefineVector(Axis axis, string vectorName)
        {
            Contract.Requires(!string.IsNullOrEmpty(vectorName));
            Contract.Requires(axis == Axis.Robot || axis == Axis.All);

            return default(Vector);
        }

        public bool RenameVector(string oldName, string newName)
        {
            Contract.Requires(!string.IsNullOrEmpty(oldName));
            Contract.Requires(!string.IsNullOrEmpty(newName));

            return default(bool);
        }

        public bool DeleteVector(Vector vector)
        {
            Contract.Requires(vector != null);

            return default(bool);
        }

        public bool DeleteVector(Vector vector, short point)
        {
            Contract.Requires(vector != null);

            return default(bool);
        }

        public bool SaveCurrentLocation(Vector vector, PointType pointType)
        {
            Contract.Requires(vector != null);

            return default(bool);
        }

        public bool Teach(Vector vector, Position position, PointType pointType)
        {
            Contract.Requires(vector != null);
            Contract.Requires(position != null);

            return default(bool);
        }

        public Position GetPointInfo(Vector vector, PointType pointType)
        {
            Contract.Requires(vector != null);
            Contract.Ensures(Contract.Result<Position>() != null);

            return default(Position);
        }

        public bool SetJoints(Vector vector, Position position, PointType pointType)
        {
            Contract.Requires(vector != null);
            Contract.Requires(position != null);

            return default(bool);
        }

        public Position GetCurrentPosition()
        {
            Contract.Ensures(Contract.Result<Position>() != null);

            return default(Position);
        }

        public void MoveToPosition(Position position, PointType pointType)
        {
            Contract.Requires(position != null);
        }

        public void EnqueueAction(Action<IRobotController> item)
        {
            Contract.Requires(item != null);
        }

        public void RunActionQueue()
        {
            throw new NotImplementedException();
        }

        public void WaitForConveyorBelt()
        {
            throw new NotImplementedException();
        }

        public void TriggerActionCompleted()
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IRobotControllerAsync Members

        public void InitializationAsync(InitializationMode mode, Action<bool> callback = null)
        {
            throw new NotImplementedException();
        }

        public void InitializationAsync(InitializationMode mode, SystemType systemType, Action<bool> callback = null)
        {
            throw new NotImplementedException();
        }

        public void HomeAsync(Axis axis, Action<bool> callback = null)
        {
            throw new NotImplementedException();
        }

        public void MoveJointAsync(Vector vector, Action<bool> callback = null)
        {
            throw new NotImplementedException();
        }

        public void MoveJointAsync(Vector vectorA, Vector vectorB, Action<bool> callback = null)
        {
            throw new NotImplementedException();
        }

        public void MoveLinearAsync(Vector vector, Action<bool> callback = null)
        {
            throw new NotImplementedException();
        }

        public void MoveLinearAsync(Vector vectorA, Vector vectorB, Action<bool> callback = null)
        {
            throw new NotImplementedException();
        }

        public void MoveConveyorBeltAsync(int velocity, Action<bool> callback = null)
        {
            throw new NotImplementedException();
        }

        public void OpenGripperAsync(Action<bool> callback = null)
        {
            throw new NotImplementedException();
        }

        public void CloseGripperAsync(Action<bool> callback = null)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IDisposable Members

        public void Dispose()
        {
            throw new NotImplementedException();
        }

        #endregion
    }

#pragma warning restore 67
}
